import java.io.FileNotFoundException;
import java.net.URL;

import org.aitools.programd.Core;
import org.aitools.programd.util.URLTools;

public class Programa {

	String bot = "askRecife";
	URL baseURL = null;
	URL propURL = null;
	Core core = null;
	
	private void initChatterbot() {
		try {
			baseURL = URLTools.createValidURL(System.getProperty("user.dir"));
			propURL = URLTools.createValidURL("conf/core.xml");
			core = new Core(baseURL, propURL);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		System.out.println(core.getResponse("Qual o seu time  ?", "user", bot));
	}
	
	public static void main(String[] args) throws Exception  {
		Programa p = new Programa();
		//Banco b = new Banco();
		TwitterWeb t = new TwitterWeb();
		
		p.initChatterbot();
		//b.readDataBase();
		t.iniciar();

	}

}
